package com.example.myDesignPatterns.结构型模式.桥接模式Bridge;

//操作系统版本
public abstract class OperatingSystemVersion {
    protected VideoFile videoFile;
    public OperatingSystemVersion(VideoFile videoFile) {
        this.videoFile = videoFile;
    }
    public abstract void play(String fileName);
}


//Windows版本
 class Windows extends OperatingSystemVersion {
    public Windows(VideoFile videoFile) {
        super(videoFile);
    }
    public void play(String fileName) {
        videoFile.decode(fileName);
    }
}
//mac版本
 class Mac extends OperatingSystemVersion {
    public Mac(VideoFile videoFile) {
        super(videoFile);
    }
    public void play(String fileName) {
        videoFile.decode(fileName);
    }
}